package advancedMobs;

import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.biome.BiomeGenBase;
import advancedMobs.client.CommonProxy;
import advancedMobs.entity.zombie.EntityAdvancedZombie;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid="AdvancedMobs", name="AdvancedMobs", version="0.0.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class AdvancedMobs 
{

        // The instance of your mod that Forge uses.
        @Instance("AdvancedMobs")
        public static AdvancedMobs instance;
       
        // Says where the client and server 'proxy' code is loaded.
        @SidedProxy(clientSide="advancedMobs.client.ClientProxy", serverSide="advancedMobs.CommonProxy")
        public static CommonProxy proxy;
       
        @PreInit
        public void preInit(FMLPreInitializationEvent event) 
        {
                // Stub Method
        }
       
        @Init
        public void load(FMLInitializationEvent event) 
        {
            proxy.registerRenderers();
            EntityRegistry.registerGlobalEntityID(EntityAdvancedZombie.class, "AdvancedZombie", EntityRegistry.findGlobalUniqueEntityId(), 24,30 );
            EntityRegistry.registerModEntity(EntityAdvancedZombie.class, "AdvancedZombie", 6, this, 128, 1, true);
            LanguageRegistry.instance().addStringLocalization("entity.AdvancedZombie.name", "en_US", "AdvancedZombie");
            for(BiomeGenBase bio : BiomeGenBase.biomeList)
            {
            	if(bio!=null)
            	{
            		EntityRegistry.addSpawn(EntityAdvancedZombie.class, 0, 0, 0, EnumCreatureType.monster, bio);
            	}
            }
        }
       
        @PostInit
        public void postInit(FMLPostInitializationEvent event) 
        {
                // Stub Method
        }
}